﻿Imports Runa.Foundation.CompoentModel
Imports Microsoft.Xna.Framework.Input.Touch
Imports Runa.Foundation.Messaging

Namespace Global.Runa.UI.Input

    Public Class InputEventArgs
        Inherits PropertyChangedEventArgs(Of Object)

        Public Property Location() As Microsoft.Xna.Framework.Point
        Public Property Message() As MessageType
        Public Property Handled() As Boolean = False

        Public Sub New(ByVal p As Microsoft.Xna.Framework.Point, ByVal msg As MessageType, Optional ByVal cpi As IChangedPropertyInf(Of Object) = Nothing)
            Me.Location = p
            Me.ChangedProperty = If(cpi, New ChangedPropertyInf(Of Object)("Location"))
            Me.Message = msg
        End Sub

    End Class

    Public Class MouseInputEventArgs
        Inherits InputEventArgs

        Public Property MouseState() As Microsoft.Xna.Framework.Input.MouseState
        Public Property MouseWheelDelta() As Integer

        Public Sub New(ByVal msg As MessageType, ByVal mouseState As Microsoft.Xna.Framework.Input.MouseState, Optional ByVal cpi As IChangedPropertyInf(Of Object) = Nothing)
            MyBase.New(New Microsoft.Xna.Framework.Point(mouseState.X, mouseState.Y), msg, cpi)
            Me.MouseState = mouseState
        End Sub

    End Class

    Public Class KeyboradInputEventArgs
        Inherits InputEventArgs

        Public Property KeyboardState() As Microsoft.Xna.Framework.Input.KeyboardState
        Public Property KeyValue() As Microsoft.Xna.Framework.Input.Keys

        Public Sub New(ByVal msg As MessageType, ByVal keyboardState As Microsoft.Xna.Framework.Input.KeyboardState, Optional ByVal cpi As IChangedPropertyInf(Of Object) = Nothing)
            MyBase.New(Nothing, msg, cpi)
            Me.KeyboardState = keyboardState
        End Sub

    End Class

    Public Class TocuhPadInputEventArgs
        Inherits InputEventArgs

        Public Property TocuhState() As TouchCollection
        Public Property Gesture() As GestureSample

        Public Sub New(ByVal msg As MessageType, ByVal touchState As TouchCollection, ByVal gesture As GestureSample, Optional ByVal cpi As IChangedPropertyInf(Of Object) = Nothing)
            MyBase.New(Nothing, msg, cpi)
            Me.TocuhState = touchState
            Me.Gesture = gesture
        End Sub

    End Class

End Namespace